dictA={
    "G1569":["北京南","天津南","11月08日","18:06","18:39","00:33"],
    "G1567":["北京南","天津南","11月08日","18:15","18:49","00:34"],
    "G8917":["北京南","天津南","11月08日","18:20","19:19","00:59"],
    "G203":["北京南","天津南","11月08日","18:35","19:09","00:34"],
}
print('车次\t\t\t出发站\t\t到达站\t\t出发日期\t\t出发时间\t\t到达时间\t\t历时时长')
for a,b in  dictA.items():
    print(a,*b,sep="\t\t") #sep默认是一个空格，我们可以替换成其他的
checi=input("请输入要购买的车次")
ren= input("请输入乘车人，如果是多位乘车人，使用逗号隔开：")
cheInfo= dictA.get(checi)  #车次信息
if cheInfo!=None: #判断车次是否存在
    print(f"【12306】{ren}购票成功，{cheInfo[2]}{checi}次，{cheInfo[0]}{cheInfo[3]}开")



